Optimal. Leaf size=66 \[ \frac{2 \sqrt{a} c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{f}+\frac{2 a d \tan (e+f x)}{f \sqrt{a \sec (e+f x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0868663, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.16, Rules used = {3915, 3774, 203, 3792} \[ \frac{2 \sqrt{a} c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{f}+\frac{2 a d \tan (e+f x)}{f \sqrt{a \sec (e+f x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3915
Rule 3774
Rule 203
Rule 3792
Rubi steps
\begin{align*} \int \sqrt{a+a \sec (e+f x)} (c+d \sec (e+f x)) \, dx &=c \int \sqrt{a+a \sec (e+f x)} \, dx+d \int \sec (e+f x) \sqrt{a+a \sec (e+f x)} \, dx\\ &=\frac{2 a d \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)}}-\frac{(2 a c) \operatorname{Subst}\left (\int \frac{1}{a+x^2} \, dx,x,-\frac{a \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=\frac{2 \sqrt{a} c \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}+\frac{2 a d \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)}}\\ \end{align*}
Mathematica [A] time = 0.316288, size = 76, normalized size = 1.15 \[ \frac{\sec \left (\frac{1}{2} (e+f x)\right ) \sqrt{a (\sec (e+f x)+1)} \left (\sqrt{2} c \sin ^{-1}\left (\sqrt{2} \sin \left (\frac{1}{2} (e+f x)\right )\right ) \sqrt{\cos (e+f x)}+2 d \sin \left (\frac{1}{2} (e+f x)\right )\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.214, size = 118, normalized size = 1.8 \begin{align*} -{\frac{1}{f\sin \left ( fx+e \right ) }\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}} \left ( \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sqrt{2}{\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( fx+e \right ) }{2\,\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) c\sin \left ( fx+e \right ) +2\,d\cos \left ( fx+e \right ) -2\,d \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.6785, size = 198, normalized size = 3. \begin{align*} \frac{\sqrt{a} c \arctan \left ({\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac{1}{4}} \sin \left (\frac{1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) + \sin \left (f x + e\right ),{\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}^{\frac{1}{4}} \cos \left (\frac{1}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right )\right ) + \cos \left (f x + e\right )\right )}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.15547, size = 620, normalized size = 9.39 \begin{align*} \left [\frac{{\left (c \cos \left (f x + e\right ) + c\right )} \sqrt{-a} \log \left (\frac{2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) + 2 \, d \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{f \cos \left (f x + e\right ) + f}, -\frac{2 \,{\left ({\left (c \cos \left (f x + e\right ) + c\right )} \sqrt{a} \arctan \left (\frac{\sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) - d \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{f \cos \left (f x + e\right ) + f}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \left (\sec{\left (e + f x \right )} + 1\right )} \left (c + d \sec{\left (e + f x \right )}\right )\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]